package com.gxc.utils;

/**
 * Controller 返回数据.
 *
 * @author 宫新程
 * @since 2018/12/1 3:15 PM
 */
public class RestControllerResult<T> {

  private boolean success;
  private String errorMsg;
  private T data;

  public RestControllerResult() {}

  public RestControllerResult(boolean success, String errorMsg) {
    this.success = success;
    this.errorMsg = errorMsg;
  }

  public RestControllerResult(boolean success, T data) {
    this.success = success;
    this.data = data;
  }

  public boolean isSuccess() {
    return success;
  }

  public void setSuccess(boolean success) {
    this.success = success;
  }

  public String getErrorMsg() {
    return errorMsg;
  }

  public void setErrorMsg(String errorMsg) {
    this.errorMsg = errorMsg;
  }

  public T getData() {
    return data;
  }

  public void setData(T data) {
    this.data = data;
  }
}
